package co.chuangdian.oflauncher.wallpapers.setting;

import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.os.Bundle;
import android.provider.SyncStateContract.Constants;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.GridView;
import android.widget.ImageButton;
import android.widget.SimpleAdapter;
import cn.onekit.CALLBACK;
import cn.onekit.CONFIG;
import cn.onekit.FSO;
import cn.onekit.JSON;
import cn.onekit.MESSAGE;
import co.chuangdian.oflauncher.OFActivity;
import co.chuangdian.oflauncher.R;
import uc.WallpapersView;

public class LockScreen_Album extends OFActivity{
	WallpapersView wallpapersView;
	public String path;
	

	JSONObject wallpaper_number;
	int number;
	 int id_number;
	 JSONArray wallpaper;

    		
	@Override
	protected void onCreate(Bundle savedInstanceState) {
	
		super.onCreate(savedInstanceState);
		setContentView(R.layout.wallpaper_lockscreen_album);
		wallpapersView = (WallpapersView) findViewById(R.id.wallpapersView);
		wallpapersView.setData(new CALLBACK<String>() {

			@Override
			public void run(boolean isError, String result) {
			
				JSONObject lockscreen = JSON.parse((String)CONFIG.get("lockscreen"));
				try {
					lockscreen.put("cover", result);
					CONFIG.set("lockscreen",lockscreen);
					MESSAGE.send("lockscreen_wallpaper", null, null);
				} catch (JSONException e) {
					e.printStackTrace();
				}
			}
			
		});
	}
	
	
		
		

	
	
}
